import request from "@/api/index";

export interface AuthenticationRequest {
  account: string;
  password: string;
  verifyKey: string;
  verifyCode: string;
  username: string;
}

export interface RegisterRequest extends RetrieveRequest {
  nickName: string;
}

export interface RetrieveRequest extends AuthenticationRequest {
  repeatPassword: string;
  messageVerifyCode: string;
}

export function getMyInformation() {
  return request({
    method: "get",
    url: "/my/account",
  });
}

export function login() {
  return request({
    method: "post",
    url: "/authentication",
  });
}
